package tetris;

import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;

/**
  框架类

 */
public class TetrisFrame extends JFrame {
	private TetrisPane tp;	//俄罗斯方块主游戏场景类
	private JLabel mention;		//游戏的提示信息
	
	/**
	 * 构造方法
	 */
	public TetrisFrame() {
		setSize(550,600);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setLocationRelativeTo(null);
		setTitle("深夜激情方块");
		setResizable(false);
		setLayout(new FlowLayout());
		tp = new TetrisPane();
		mention = new JLabel("");
		add(tp);
		add(mention);

		addKeyListener(tp.getInnerInstanceOfKeyControl());
		tp.addKeyListener(tp.getInnerInstanceOfKeyControl());
		setVisible(true);
	}
	
	public static void main(String[] args) {

		new TetrisFrame();

	}
}
